package com.momo.mapper.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.momo.mapper.dataobject.TestDO;
import com.momo.mapper.mapper.TestDOMapper;

/**
* The Table TEST.
* 注意:此结构有系统生成,禁止手工修改,以免被覆盖,请通过dalgen生成
* TEST
*/
@Repository
public class TestDAO{

    @Autowired
    private TestDOMapper testDOMapper;

    /**
     * desc:插入表:TEST.<br/>
     * descSql =  SELECT LAST_INSERT_ID() INSERT INTO TEST( )VALUES( )
     * @param entity entity
     * @return int
     */
    public int insert(TestDO entity){
        return testDOMapper.insert(entity);
    }
    /**
     * desc:更新表:TEST.<br/>
     * descSql =  UPDATE TEST SET WHERE ID = #{id,jdbcType=VARCHAR}
     * @param entity entity
     * @return int
     */
    public int update(TestDO entity){
        return testDOMapper.update(entity);
    }
    /**
     * desc:根据主键删除数据:TEST.<br/>
     * descSql =  DELETE FROM TEST WHERE ID = #{id,jdbcType=VARCHAR}
     * @param id id
     * @return int
     */
    public int deleteById(String id){
        return testDOMapper.deleteById(id);
    }
    /**
     * desc:根据主键获取数据:TEST.<br/>
     * descSql =  SELECT * FROM TEST WHERE ID = #{id,jdbcType=VARCHAR}
     * @param id id
     * @return TestDO
     */
    public TestDO getById(String id){
        return testDOMapper.getById(id);
    }
}
